package com.imooc.oo

object AbstractApp {

  def main(args: Array[String]): Unit = {

    val student = new MathTeacher
    println(student.name)
    student.speak

  }

}

abstract class Teacher{

  def speak

  val name:String
  val age:Int

}

class MathTeacher extends Teacher{

  override def speak: Unit = {
    println(" Math Teacher Is Speaking ")
  }

  override val name: String = "PK"
  override val age: Int = 18

}
